home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / me_cd25.zip / MUTT2.ZIP / MISC.MUT < prev    next >
Text File  |  1992-11-09  |  328b  |  17 lines

  1.   ;; C Durland    Public Domain
  2.  
  3. (defun
  4.   delete-lines-with-re
  5.   {
  6.     (int n)
  7.     (string re)
  8.  
  9.     (re (ask "Delete all lines containing reg-exp: "))
  10.     (beginning-of-buffer)
  11.     (n 0)
  12.     (while (re-search-forward re)
  13.     { (+= n 1)(beginning-of-line)(arg-prefix 1)(cut-line) })
  14.     (msg n " lines deleted.")
  15.   }
  16. )
  17.